<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of dashboard
 * 
 * @author Subha Sundar Das (subhasundar.das@gmail.com)
 */
class Dashboard extends MX_Controller {

   

    function dashboard() {
    	parent :: __construct();
    	$this->load->model(array('admin_commoncall','admin_settings_model','admin_counter_model'));
    	$this->admin_commoncall->check_admin_login();
    	
    	$this->template
    	->set_layout('default') // application/views/layouts/two_col.php
    	->set_theme('admin'); // application/views/layouts/two_col.php
    	
    	$this->template->title('Dashboard', $this->settings_model->get_setting('webtitle'))
    	->set_partial('nav_bar', 'layouts/nav_bar')
    	->set_partial('side_menu', 'layouts/side_menu')
    	->set_partial('footer','footer/footer');
    	
    }
//--------Admin Dashboard----------------------
    function index() {
    	//--Listing
    	$data['listing_active'] = $this->admin_counter_model->count_listing(51);
    	$data['listing_inactive'] = $this->admin_counter_model->count_listing(1);
    	
    	//--Photos
    	//--Logos
    	$data['logos'] = $this->admin_counter_model->count_logos('nologo.gif');
    	
    	//--Banner
    	$data['banners'] = $this->admin_counter_model->count_banners();
    	
    	
    	//--Video
    	// $data['video_active'] = $this->counter_model->count_videos(51);
    	//$data['video_inactive'] = $this->counter_model->count_videos(1);
    	
    	//--Category
    	$data['category'] = $this->admin_counter_model->count_categories(51);
    	
    	$data['keyword'] = $this->admin_counter_model->countKeyword(51);
    	
    	//--Total member
    	$data['member'] = $this->admin_counter_model->count_member();
    	
    	//--Total enquiry
    	$data['enquiry'] = $this->admin_counter_model->count_enquiry();
    	
    	//--Total Incorrect
    	//$data['incorrect'] = $this->counter_model->count_incorrect_report();
    	
    	//--Total review
    	$data['review'] = $this->admin_counter_model->count_review();
    	 
        $this->template->build('dashboard/dashboard',$data);
    }
}
?>